﻿using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
namespace INTEX.DataBase.Tools
{
    public partial class INTEXDBC
    {
        public DataRow Convert2MKRF(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryMKRF(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                case "JLT":
                default:
                    #region====JLT======
                    dwReturn["MKFMANDANT"] = "00";
                    dwReturn["MKFMNRKRS"] = "  ";
                    dwReturn["MKFMLFDNR"] = "0000";
                    dwReturn["MKFMPOS"] = "01";
                    dwReturn["MKFLFDNR"] = "1";
                    dwReturn["MKFNEUB"] = "        ";
                    dwReturn["MKFNEUD"] = "0";
                    dwReturn["MKFAENB"] = "        ";
                    dwReturn["MKFAEND"] = "0";
                    dwReturn["MKFAENZL"] = "0";
                    dwReturn["MKFERLKZ"] = " ";
                    dwReturn["MKFERLDAT"] = "00000000";
                    dwReturn["MKFAUFKRS"] = "  ";
                    dwReturn["MKFAUFLFD"] = "000000";
                    dwReturn["MKFAUFPOS"] = "000";
                    dwReturn["MKFAFOLGE"] = "000";
                    dwReturn["MKFTP"] = "0000";
                    dwReturn["MKFRWKRS"] = "  ";
                    dwReturn["MKFRWLFD"] = "000000";
                    dwReturn["MKFRWPOS"] = "0000";
                    dwReturn["MKFPLDATV"] = "0";
                    dwReturn["MKFSCHICHTV"] = "0";
                    dwReturn["MKFPLDATB"] = "0";
                    dwReturn["MKFSCHICHTB"] = "0";
                    dwReturn["MKFRFKZ"] = " ";
                    dwReturn["MKFRUESTZT"] = "0";
                    dwReturn["MKFBEARBZT"] = "0";
                    dwReturn["MKFSME"] = "5";
                    dwReturn["MKFSMG1"] = "0";
                    dwReturn["MKFSMG2"] = "0";
                    dwReturn["MKFSMG3"] = "0";
                    dwReturn["MKFSMG4"] = "0";
                    dwReturn["MKFSMG5"] = "0";
                    dwReturn["MKFSMG6"] = "0";
                    dwReturn["MKFSMG7"] = "0";
                    dwReturn["MKFSMG8"] = "0";
                    dwReturn["MKFAUTO"] = " ";
                    dwReturn["MKFBFARBE1"] = "0";
                    dwReturn["MKFBFARBE2"] = "0";
                    dwReturn["MKFBFARBE3"] = "0";
                    dwReturn["MKFBFARBE4"] = "0";
                    dwReturn["MKFBFARBE5"] = "0";
                    dwReturn["MKFBFARBE6"] = "0";
                    dwReturn["MKFBFARBE7"] = "0";
                    dwReturn["MKFBFARBE8"] = "0";
                    dwReturn["MKFBFARBE9"] = "0";
                    dwReturn["MKFBFARBE10"] = "0";
                    dwReturn["MKFSORTFD1"] = "                                                                           ";
                    dwReturn["MKFSORTFD2"] = "                                                                           ";
                    dwReturn["MKFSORTFD3"] = "                                                                           ";
                    dwReturn["MKFPLSTUFE"] = " ";
                    dwReturn["MKFBDEDAT"] = "0";
                    dwReturn["MKFBDEZT"] = "0";
                    dwReturn["MKFBDEBEN"] = "        ";
                    dwReturn["MKFRGBWERT1"] = "000";
                    dwReturn["MKFRGBWERT2"] = "000";
                    dwReturn["MKFRGBWERT3"] = "000";
                    dwReturn["MKFFRBH"] = "000";
                    dwReturn["MKFFLAG"] = "0";
                    dwReturn["MKFSETQF1"] = "  ";
                    dwReturn["MKFNUMKZ1"] = " ";
                    dwReturn["MKFWERT1"] = "                ";
                    dwReturn["MKFCODE1"] = "   ";
                    dwReturn["MKFTIME1"] = "0";
                    dwReturn["MKFSETQF2"] = "  ";
                    dwReturn["MKFNUMKZ2"] = " ";
                    dwReturn["MKFWERT2"] = "                ";
                    dwReturn["MKFCODE2"] = "   ";
                    dwReturn["MKFTIME2"] = "0";
                    dwReturn["MKFSETQF3"] = "  ";
                    dwReturn["MKFNUMKZ3"] = " ";
                    dwReturn["MKFWERT3"] = "                ";
                    dwReturn["MKFCODE3"] = "   ";
                    dwReturn["MKFTIME3"] = "0";
                    dwReturn["MKFSETQF4"] = "  ";
                    dwReturn["MKFNUMKZ4"] = " ";
                    dwReturn["MKFWERT4"] = "                ";
                    dwReturn["MKFCODE4"] = "   ";
                    dwReturn["MKFTIME4"] = "0";
                    dwReturn["MKFSETQF5"] = "  ";
                    dwReturn["MKFNUMKZ5"] = " ";
                    dwReturn["MKFWERT5"] = "                ";
                    dwReturn["MKFCODE5"] = "   ";
                    dwReturn["MKFTIME5"] = "0";
                    dwReturn["MKFSETQF6"] = "  ";
                    dwReturn["MKFNUMKZ6"] = " ";
                    dwReturn["MKFWERT6"] = "                ";
                    dwReturn["MKFCODE6"] = "   ";
                    dwReturn["MKFTIME6"] = "0";
                    dwReturn["MKFSETQF7"] = "  ";
                    dwReturn["MKFNUMKZ7"] = " ";
                    dwReturn["MKFWERT7"] = "                ";
                    dwReturn["MKFCODE7"] = "   ";
                    dwReturn["MKFTIME7"] = "0";
                    dwReturn["MKFSETQF8"] = "  ";
                    dwReturn["MKFNUMKZ8"] = " ";
                    dwReturn["MKFWERT8"] = "                ";
                    dwReturn["MKFCODE8"] = "   ";
                    dwReturn["MKFTIME8"] = "0";
                    dwReturn["MKFSETQF9"] = "  ";
                    dwReturn["MKFNUMKZ9"] = " ";
                    dwReturn["MKFWERT9"] = "                ";
                    dwReturn["MKFCODE9"] = "   ";
                    dwReturn["MKFTIME9"] = "0";
                    dwReturn["MKFSETQF10"] = "  ";
                    dwReturn["MKFNUMKZ10"] = " ";
                    dwReturn["MKFWERT10"] = "                ";
                    dwReturn["MKFCODE10"] = "   ";
                    dwReturn["MKFTIME10"] = "0";
                    dwReturn["MKFMODNR"] = "000";
                    dwReturn["MKFEINSTNR"] = "000";
                    dwReturn["MKFPROG"] = "                ";
                    dwReturn["MKFREZST"] = "0";
                    dwReturn["MKFBEZ"] = "                              ";
                    dwReturn["MKFCLTIME"] = "0";
                    dwReturn["MKFHARCHA"] = " ";
                    dwReturn["MKFKZHCMAN"] = " ";
                    dwReturn["MKFNBWCHA"] = "00";
                    dwReturn["MKFMAUFKRS"] = "  ";
                    dwReturn["MKFMAUFLFD"] = "000000";
                    dwReturn["MKFMAUFPOS"] = "000";
                    dwReturn["MKFMAFOLGE"] = "000";
                    dwReturn["MKFMTP"] = "0000";
                    dwReturn["MKFVMNRKRS"] = "  ";
                    dwReturn["MKFVMLFDNR"] = "0000";
                    dwReturn["MKFVMPOS"] = "00";
                    dwReturn["MKFSDATF"] = "0";
                    dwReturn["MKFSZEITF"] = "0";
                    dwReturn["MKFSDATE"] = "0";
                    dwReturn["MKFSZEITE"] = "0";
                    dwReturn["MKFSDATB"] = "0";
                    dwReturn["MKFSZEITB"] = "0";
                    dwReturn["MKFEDAT"] = "0";
                    dwReturn["MKFEZEIT"] = "0";
                    dwReturn["MKFGRQM"] = "0";
                    dwReturn["MKFMENGE"] = "0";
                    dwReturn["MKFKZPOSVERT"] = " ";
                    dwReturn["MKFKETTANZ"] = "0";
                    dwReturn["MKFKETTMTR"] = "0";
                    dwReturn["MKFVORPL"] = " ";
                    dwReturn["MKFDISPO2"] = " ";
                    dwReturn["MKFBEM"] = "                                        ";
                    dwReturn["MKFFILLER"] = "                                                                            ";
                    #endregion
                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwInput.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void SaveMKRF(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            switch (ITXDBVERSION)
            {
                case "JLT":
                    setResult = QueryMKRF(dwData, 1);
                    if (setResult.Tables.Count > 0)
                    {
                        tbLocal = setResult.Tables[0];
                        if (tbLocal.Rows.Count > 0)
                        {
                            flgExist = true;
                            dwLocal = tbLocal.Rows[0];
                        }
                        else
                        {
                            dwLocal = tbLocal.NewRow();
                        }
                    }
                    MapMKRF(ref dwLocal, dwData);
                    if (!flgExist)
                    {
                        InsertMKRF(dwLocal, 1);
                    }
                    UpdateMKRF(dwLocal, 1);
                    break;
                case "YGR":
                    setResult = QueryMKRF(dwData, 1);
                    if (setResult.Tables.Count > 0)
                    {
                        tbLocal = setResult.Tables[0];
                        if (tbLocal.Rows.Count > 0)
                        {
                            flgExist = true;
                            dwLocal = tbLocal.Rows[0];
                        }
                        else
                        {
                            dwLocal = tbLocal.NewRow();
                        }
                    }
                    MapMKRF(ref dwLocal, dwData);
                    if (!flgExist)
                    {
                        InsertMKRF(dwLocal, 2);
                    }
                    UpdateMKRF(dwLocal, 2);
                    break;
                default:
                    break;
            }
        }
        public void MapMKRF(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void DeleteMKRF(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM MKRF WHERE ABAID=:MKFBEM";
                    or1.Parameters.Add("MKFBEM", OracleType.NVarChar).Value = dwData["MKFBEM"].ToString();
                    break;
                case 2:
                    or1.CommandText = "DELETE FROM MKRF T WHERE EXISTS (SELECT 1 FROM ICC_MKRF M WHERE T.MKFAUFKRS=M.ABFAUFKRS AND T.MKFAUFLFD=M.ABFAUFLFD AND T.MKFAUFPOS=M.ABFAUFPOS AND M.MKFERLKZ=:MKFERLKZ)";
                    or1.Parameters.Add("MKFERLKZ", OracleType.NVarChar).Value = dwData["MKFERLKZ"].ToString(); 
                    break;
                default:
                    break;
            }

            Connect2Proxy(or1);
        }
        public DataSet QueryMKRF(DataRow dwData, int option = 1)
        {
            DataSet setReturn = new DataSet();
            DataSet Result = new DataSet();
            DataTable tbLocal = null;
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM MKRF WHERE  ROWNUM<2 ";
                    break;
                case 1:
                    or1.CommandText = "SELECT * FROM MKRF"
                        + "  WHERE MKFAUFKRS=:MKFAUFKRS AND MKFAUFLFD=:MKFAUFLFD AND MKFAUFPOS=:MKFAUFPOS AND MKFAFOLGE=:MKFAFOLGE AND MKFTP=:MKFTP  ";
                    or1.Parameters.Add("MKFAUFKRS", OracleType.NVarChar).Value = dwData["MKFAUFKRS"].ToString();
                    or1.Parameters.Add("MKFAUFLFD", OracleType.NVarChar).Value = dwData["MKFAUFLFD"].ToString();
                    or1.Parameters.Add("MKFAUFPOS", OracleType.NVarChar).Value = dwData["MKFAUFPOS"].ToString();
                    or1.Parameters.Add("MKFAFOLGE", OracleType.NVarChar).Value = dwData["MKFAFOLGE"].ToString();
                    or1.Parameters.Add("MKFTP", OracleType.NVarChar).Value = dwData["MKFTP"].ToString();
                    break;
                case 2:
                    or1.CommandText = "SELECT M.* FROM MKRF M LEFT JOIN AMSTAMM S"
                        + " ON M.MKFMANDANT=S.AMMANDANT AND M.MKFMNRKRS=S.AMNRKRS AND M.MKFMLFDNR=S.AMLFDNR AND M.MKFMPOS=S.AMPOS"
                        + " LEFT JOIN KSTSTELL K ON S.AMMANDANT=K.KSTMANDANT AND S.AMKSTKRS=K.KSTKSTKRS AND S.AMKST=K.KSTKST"
                        + "  WHERE KSTMANDANT=:KSTMANDANT AND KSTKSTKRS=:KSTKSTKRS AND KSTKST=:KSTKST ";
                    or1.Parameters.Add("KSTMANDANT", OracleType.NVarChar).Value = dwData["KSTMANDANT"].ToString();
                    or1.Parameters.Add("KSTKSTKRS", OracleType.NVarChar).Value = dwData["KSTKSTKRS"].ToString();
                    or1.Parameters.Add("KSTKST", OracleType.NVarChar).Value = dwData["KSTKST"].ToString();
                    break;
                case 3:
                    or1.CommandText = "SELECT * FROM MKRF"
                        + "  WHERE MKFAUFKRS=:MKFAUFKRS AND MKFAUFLFD=:MKFAUFLFD ";
                    or1.Parameters.Add("MKFAUFKRS", OracleType.NVarChar).Value = dwData["ABPAUFKRS"].ToString();
                    or1.Parameters.Add("MKFAUFLFD", OracleType.NVarChar).Value = dwData["ABPAUFLFD"].ToString();
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
            {
                tbLocal = Result.Tables[0];
                tbLocal.TableName = "MKRF";
            }
            setReturn.Merge(Result);
            return setReturn;
        }
        public void UpdateMKRF(DataRow dwData, int option)
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region========UPDATE============
                    or1.CommandText = "  UPDATE MKRF SET "
                        + "MKFMANDANT=:MKFMANDANT,"
                        + "MKFMNRKRS=:MKFMNRKRS,"
                        + "MKFMLFDNR=:MKFMLFDNR,"
                        + "MKFMPOS=:MKFMPOS,"
                        + "MKFLFDNR=:MKFLFDNR,"
                        + "MKFNEUB=:MKFNEUB,"
                        + "MKFNEUD=:MKFNEUD,"
                        + "MKFAENB=:MKFAENB,"
                        + "MKFAEND=:MKFAEND,"
                        + "MKFAENZL=:MKFAENZL,"
                        + "MKFERLKZ=:MKFERLKZ,"
                        + "MKFERLDAT=:MKFERLDAT,"
                        + "MKFAUFKRS=:MKFAUFKRS,"
                        + "MKFAUFLFD=:MKFAUFLFD,"
                        + "MKFAUFPOS=:MKFAUFPOS,"
                        + "MKFAFOLGE=:MKFAFOLGE,"
                        + "MKFTP=:MKFTP,"
                        + "MKFRWKRS=:MKFRWKRS,"
                        + "MKFRWLFD=:MKFRWLFD,"
                        + "MKFRWPOS=:MKFRWPOS,"
                        + "MKFPLDATV=:MKFPLDATV,"
                        + "MKFSCHICHTV=:MKFSCHICHTV,"
                        + "MKFPLDATB=:MKFPLDATB,"
                        + "MKFSCHICHTB=:MKFSCHICHTB,"
                        + "MKFRFKZ=:MKFRFKZ,"
                        + "MKFRUESTZT=:MKFRUESTZT,"
                        + "MKFBEARBZT=:MKFBEARBZT,"
                        + "MKFSME=:MKFSME,"
                        + "MKFSMG1=:MKFSMG1,"
                        + "MKFSMG2=:MKFSMG2,"
                        + "MKFSMG3=:MKFSMG3,"
                        + "MKFSMG4=:MKFSMG4,"
                        + "MKFSMG5=:MKFSMG5,"
                        + "MKFSMG6=:MKFSMG6,"
                        + "MKFSMG7=:MKFSMG7,"
                        + "MKFSMG8=:MKFSMG8,"
                        + "MKFAUTO=:MKFAUTO,"
                        + "MKFBFARBE1=:MKFBFARBE1,"
                        + "MKFBFARBE2=:MKFBFARBE2,"
                        + "MKFBFARBE3=:MKFBFARBE3,"
                        + "MKFBFARBE4=:MKFBFARBE4,"
                        + "MKFBFARBE5=:MKFBFARBE5,"
                        + "MKFBFARBE6=:MKFBFARBE6,"
                        + "MKFBFARBE7=:MKFBFARBE7,"
                        + "MKFBFARBE8=:MKFBFARBE8,"
                        + "MKFBFARBE9=:MKFBFARBE9,"
                        + "MKFBFARBE10=:MKFBFARBE10,"
                        + "MKFSORTFD1=:MKFSORTFD1,"
                        + "MKFSORTFD2=:MKFSORTFD2,"
                        + "MKFSORTFD3=:MKFSORTFD3,"
                        + "MKFPLSTUFE=:MKFPLSTUFE,"
                        + "MKFBDEDAT=:MKFBDEDAT,"
                        + "MKFBDEZT=:MKFBDEZT,"
                        + "MKFBDEBEN=:MKFBDEBEN,"
                        + "MKFRGBWERT1=:MKFRGBWERT1,"
                        + "MKFRGBWERT2=:MKFRGBWERT2,"
                        + "MKFRGBWERT3=:MKFRGBWERT3,"
                        + "MKFFRBH=:MKFFRBH,"
                        + "MKFFLAG=:MKFFLAG,"
                        + "MKFSETQF1=:MKFSETQF1,"
                        + "MKFNUMKZ1=:MKFNUMKZ1,"
                        + "MKFWERT1=:MKFWERT1,"
                        + "MKFCODE1=:MKFCODE1,"
                        + "MKFTIME1=:MKFTIME1,"
                        + "MKFSETQF2=:MKFSETQF2,"
                        + "MKFNUMKZ2=:MKFNUMKZ2,"
                        + "MKFWERT2=:MKFWERT2,"
                        + "MKFCODE2=:MKFCODE2,"
                        + "MKFTIME2=:MKFTIME2,"
                        + "MKFSETQF3=:MKFSETQF3,"
                        + "MKFNUMKZ3=:MKFNUMKZ3,"
                        + "MKFWERT3=:MKFWERT3,"
                        + "MKFCODE3=:MKFCODE3,"
                        + "MKFTIME3=:MKFTIME3,"
                        + "MKFSETQF4=:MKFSETQF4,"
                        + "MKFNUMKZ4=:MKFNUMKZ4,"
                        + "MKFWERT4=:MKFWERT4,"
                        + "MKFCODE4=:MKFCODE4,"
                        + "MKFTIME4=:MKFTIME4,"
                        + "MKFSETQF5=:MKFSETQF5,"
                        + "MKFNUMKZ5=:MKFNUMKZ5,"
                        + "MKFWERT5=:MKFWERT5,"
                        + "MKFCODE5=:MKFCODE5,"
                        + "MKFTIME5=:MKFTIME5,"
                        + "MKFSETQF6=:MKFSETQF6,"
                        + "MKFNUMKZ6=:MKFNUMKZ6,"
                        + "MKFWERT6=:MKFWERT6,"
                        + "MKFCODE6=:MKFCODE6,"
                        + "MKFTIME6=:MKFTIME6,"
                        + "MKFSETQF7=:MKFSETQF7,"
                        + "MKFNUMKZ7=:MKFNUMKZ7,"
                        + "MKFWERT7=:MKFWERT7,"
                        + "MKFCODE7=:MKFCODE7,"
                        + "MKFTIME7=:MKFTIME7,"
                        + "MKFSETQF8=:MKFSETQF8,"
                        + "MKFNUMKZ8=:MKFNUMKZ8,"
                        + "MKFWERT8=:MKFWERT8,"
                        + "MKFCODE8=:MKFCODE8,"
                        + "MKFTIME8=:MKFTIME8,"
                        + "MKFSETQF9=:MKFSETQF9,"
                        + "MKFNUMKZ9=:MKFNUMKZ9,"
                        + "MKFWERT9=:MKFWERT9,"
                        + "MKFCODE9=:MKFCODE9,"
                        + "MKFTIME9=:MKFTIME9,"
                        + "MKFSETQF10=:MKFSETQF10,"
                        + "MKFNUMKZ10=:MKFNUMKZ10,"
                        + "MKFWERT10=:MKFWERT10,"
                        + "MKFCODE10=:MKFCODE10,"
                        + "MKFTIME10=:MKFTIME10,"
                        + "MKFMODNR=:MKFMODNR,"
                        + "MKFEINSTNR=:MKFEINSTNR,"
                        + "MKFPROG=:MKFPROG,"
                        + "MKFREZST=:MKFREZST,"
                        + "MKFBEZ=:MKFBEZ,"
                        + "MKFCLTIME=:MKFCLTIME,"
                        + "MKFHARCHA=:MKFHARCHA,"
                        + "MKFKZHCMAN=:MKFKZHCMAN,"
                        + "MKFNBWCHA=:MKFNBWCHA,"
                        + "MKFMAUFKRS=:MKFMAUFKRS,"
                        + "MKFMAUFLFD=:MKFMAUFLFD,"
                        + "MKFMAUFPOS=:MKFMAUFPOS,"
                        + "MKFMAFOLGE=:MKFMAFOLGE,"
                        + "MKFMTP=:MKFMTP,"
                        + "MKFVMNRKRS=:MKFVMNRKRS,"
                        + "MKFVMLFDNR=:MKFVMLFDNR,"
                        + "MKFVMPOS=:MKFVMPOS,"
                        + "MKFSDATF=:MKFSDATF,"
                        + "MKFSZEITF=:MKFSZEITF,"
                        + "MKFSDATE=:MKFSDATE,"
                        + "MKFSZEITE=:MKFSZEITE,"
                        + "MKFSDATB=:MKFSDATB,"
                        + "MKFSZEITB=:MKFSZEITB,"
                        + "MKFEDAT=:MKFEDAT,"
                        + "MKFEZEIT=:MKFEZEIT,"
                        + "MKFGRQM=:MKFGRQM,"
                        + "MKFMENGE=:MKFMENGE,"
                        + "MKFKZPOSVERT=:MKFKZPOSVERT,"
                        + "MKFKETTANZ=:MKFKETTANZ,"
                        + "MKFKETTMTR=:MKFKETTMTR,"
                        + "MKFVORPL=:MKFVORPL,"
                        + "MKFDISPO2=:MKFDISPO2,"
                        + "MKFFILLER=:MKFFILLER "

                    #endregion
                    + " WHERE  "
                    + "  WHERE MKFAUFKRS=:MKFAUFKRS AND MKFAUFLFD=:MKFAUFLFD AND MKFAUFPOS=:MKFAUFPOS AND MKFAFOLGE=:MKFAFOLGE AND MKFTP=:MKFTP ";
                    #region=====Parameters=====
                    or1.Parameters.Add("MKFMANDANT", OracleType.NVarChar).Value = dwData["MKFMANDANT"].ToString();
                    or1.Parameters.Add("MKFMNRKRS", OracleType.NVarChar).Value = dwData["MKFMNRKRS"].ToString();
                    or1.Parameters.Add("MKFMLFDNR", OracleType.NVarChar).Value = dwData["MKFMLFDNR"].ToString();
                    or1.Parameters.Add("MKFMPOS", OracleType.NVarChar).Value = dwData["MKFMPOS"].ToString();
                    or1.Parameters.Add("MKFLFDNR", OracleType.NVarChar).Value = dwData["MKFLFDNR"].ToString();
                    or1.Parameters.Add("MKFNEUB", OracleType.NVarChar).Value = dwData["MKFNEUB"].ToString();
                    or1.Parameters.Add("MKFNEUD", OracleType.NVarChar).Value = dwData["MKFNEUD"].ToString();
                    or1.Parameters.Add("MKFAENB", OracleType.NVarChar).Value = dwData["MKFAENB"].ToString();
                    or1.Parameters.Add("MKFAEND", OracleType.NVarChar).Value = dwData["MKFAEND"].ToString();
                    or1.Parameters.Add("MKFAENZL", OracleType.NVarChar).Value = dwData["MKFAENZL"].ToString();
                    or1.Parameters.Add("MKFERLKZ", OracleType.NVarChar).Value = dwData["MKFERLKZ"].ToString();
                    or1.Parameters.Add("MKFERLDAT", OracleType.NVarChar).Value = dwData["MKFERLDAT"].ToString();
                    or1.Parameters.Add("MKFAUFKRS", OracleType.NVarChar).Value = dwData["MKFAUFKRS"].ToString();
                    or1.Parameters.Add("MKFAUFLFD", OracleType.NVarChar).Value = dwData["MKFAUFLFD"].ToString();
                    or1.Parameters.Add("MKFAUFPOS", OracleType.NVarChar).Value = dwData["MKFAUFPOS"].ToString();
                    or1.Parameters.Add("MKFAFOLGE", OracleType.NVarChar).Value = dwData["MKFAFOLGE"].ToString();
                    or1.Parameters.Add("MKFTP", OracleType.NVarChar).Value = dwData["MKFTP"].ToString();
                    or1.Parameters.Add("MKFRWKRS", OracleType.NVarChar).Value = dwData["MKFRWKRS"].ToString();
                    or1.Parameters.Add("MKFRWLFD", OracleType.NVarChar).Value = dwData["MKFRWLFD"].ToString();
                    or1.Parameters.Add("MKFRWPOS", OracleType.NVarChar).Value = dwData["MKFRWPOS"].ToString();
                    or1.Parameters.Add("MKFPLDATV", OracleType.NVarChar).Value = dwData["MKFPLDATV"].ToString();
                    or1.Parameters.Add("MKFSCHICHTV", OracleType.NVarChar).Value = dwData["MKFSCHICHTV"].ToString();
                    or1.Parameters.Add("MKFPLDATB", OracleType.NVarChar).Value = dwData["MKFPLDATB"].ToString();
                    or1.Parameters.Add("MKFSCHICHTB", OracleType.NVarChar).Value = dwData["MKFSCHICHTB"].ToString();
                    or1.Parameters.Add("MKFRFKZ", OracleType.NVarChar).Value = dwData["MKFRFKZ"].ToString();
                    or1.Parameters.Add("MKFRUESTZT", OracleType.NVarChar).Value = dwData["MKFRUESTZT"].ToString();
                    or1.Parameters.Add("MKFBEARBZT", OracleType.NVarChar).Value = dwData["MKFBEARBZT"].ToString();
                    or1.Parameters.Add("MKFSME", OracleType.NVarChar).Value = dwData["MKFSME"].ToString();
                    or1.Parameters.Add("MKFSMG1", OracleType.NVarChar).Value = dwData["MKFSMG1"].ToString();
                    or1.Parameters.Add("MKFSMG2", OracleType.NVarChar).Value = dwData["MKFSMG2"].ToString();
                    or1.Parameters.Add("MKFSMG3", OracleType.NVarChar).Value = dwData["MKFSMG3"].ToString();
                    or1.Parameters.Add("MKFSMG4", OracleType.NVarChar).Value = dwData["MKFSMG4"].ToString();
                    or1.Parameters.Add("MKFSMG5", OracleType.NVarChar).Value = dwData["MKFSMG5"].ToString();
                    or1.Parameters.Add("MKFSMG6", OracleType.NVarChar).Value = dwData["MKFSMG6"].ToString();
                    or1.Parameters.Add("MKFSMG7", OracleType.NVarChar).Value = dwData["MKFSMG7"].ToString();
                    or1.Parameters.Add("MKFSMG8", OracleType.NVarChar).Value = dwData["MKFSMG8"].ToString();
                    or1.Parameters.Add("MKFAUTO", OracleType.NVarChar).Value = dwData["MKFAUTO"].ToString();
                    or1.Parameters.Add("MKFBFARBE1", OracleType.NVarChar).Value = dwData["MKFBFARBE1"].ToString();
                    or1.Parameters.Add("MKFBFARBE2", OracleType.NVarChar).Value = dwData["MKFBFARBE2"].ToString();
                    or1.Parameters.Add("MKFBFARBE3", OracleType.NVarChar).Value = dwData["MKFBFARBE3"].ToString();
                    or1.Parameters.Add("MKFBFARBE4", OracleType.NVarChar).Value = dwData["MKFBFARBE4"].ToString();
                    or1.Parameters.Add("MKFBFARBE5", OracleType.NVarChar).Value = dwData["MKFBFARBE5"].ToString();
                    or1.Parameters.Add("MKFBFARBE6", OracleType.NVarChar).Value = dwData["MKFBFARBE6"].ToString();
                    or1.Parameters.Add("MKFBFARBE7", OracleType.NVarChar).Value = dwData["MKFBFARBE7"].ToString();
                    or1.Parameters.Add("MKFBFARBE8", OracleType.NVarChar).Value = dwData["MKFBFARBE8"].ToString();
                    or1.Parameters.Add("MKFBFARBE9", OracleType.NVarChar).Value = dwData["MKFBFARBE9"].ToString();
                    or1.Parameters.Add("MKFBFARBE10", OracleType.NVarChar).Value = dwData["MKFBFARBE10"].ToString();
                    or1.Parameters.Add("MKFSORTFD1", OracleType.NVarChar).Value = dwData["MKFSORTFD1"].ToString();
                    or1.Parameters.Add("MKFSORTFD2", OracleType.NVarChar).Value = dwData["MKFSORTFD2"].ToString();
                    or1.Parameters.Add("MKFSORTFD3", OracleType.NVarChar).Value = dwData["MKFSORTFD3"].ToString();
                    or1.Parameters.Add("MKFPLSTUFE", OracleType.NVarChar).Value = dwData["MKFPLSTUFE"].ToString();
                    or1.Parameters.Add("MKFBDEDAT", OracleType.NVarChar).Value = dwData["MKFBDEDAT"].ToString();
                    or1.Parameters.Add("MKFBDEZT", OracleType.NVarChar).Value = dwData["MKFBDEZT"].ToString();
                    or1.Parameters.Add("MKFBDEBEN", OracleType.NVarChar).Value = dwData["MKFBDEBEN"].ToString();
                    or1.Parameters.Add("MKFRGBWERT1", OracleType.NVarChar).Value = dwData["MKFRGBWERT1"].ToString();
                    or1.Parameters.Add("MKFRGBWERT2", OracleType.NVarChar).Value = dwData["MKFRGBWERT2"].ToString();
                    or1.Parameters.Add("MKFRGBWERT3", OracleType.NVarChar).Value = dwData["MKFRGBWERT3"].ToString();
                    or1.Parameters.Add("MKFFRBH", OracleType.NVarChar).Value = dwData["MKFFRBH"].ToString();
                    or1.Parameters.Add("MKFFLAG", OracleType.NVarChar).Value = dwData["MKFFLAG"].ToString();
                    or1.Parameters.Add("MKFSETQF1", OracleType.NVarChar).Value = dwData["MKFSETQF1"].ToString();
                    or1.Parameters.Add("MKFNUMKZ1", OracleType.NVarChar).Value = dwData["MKFNUMKZ1"].ToString();
                    or1.Parameters.Add("MKFWERT1", OracleType.NVarChar).Value = dwData["MKFWERT1"].ToString();
                    or1.Parameters.Add("MKFCODE1", OracleType.NVarChar).Value = dwData["MKFCODE1"].ToString();
                    or1.Parameters.Add("MKFTIME1", OracleType.NVarChar).Value = dwData["MKFTIME1"].ToString();
                    or1.Parameters.Add("MKFSETQF2", OracleType.NVarChar).Value = dwData["MKFSETQF2"].ToString();
                    or1.Parameters.Add("MKFNUMKZ2", OracleType.NVarChar).Value = dwData["MKFNUMKZ2"].ToString();
                    or1.Parameters.Add("MKFWERT2", OracleType.NVarChar).Value = dwData["MKFWERT2"].ToString();
                    or1.Parameters.Add("MKFCODE2", OracleType.NVarChar).Value = dwData["MKFCODE2"].ToString();
                    or1.Parameters.Add("MKFTIME2", OracleType.NVarChar).Value = dwData["MKFTIME2"].ToString();
                    or1.Parameters.Add("MKFSETQF3", OracleType.NVarChar).Value = dwData["MKFSETQF3"].ToString();
                    or1.Parameters.Add("MKFNUMKZ3", OracleType.NVarChar).Value = dwData["MKFNUMKZ3"].ToString();
                    or1.Parameters.Add("MKFWERT3", OracleType.NVarChar).Value = dwData["MKFWERT3"].ToString();
                    or1.Parameters.Add("MKFCODE3", OracleType.NVarChar).Value = dwData["MKFCODE3"].ToString();
                    or1.Parameters.Add("MKFTIME3", OracleType.NVarChar).Value = dwData["MKFTIME3"].ToString();
                    or1.Parameters.Add("MKFSETQF4", OracleType.NVarChar).Value = dwData["MKFSETQF4"].ToString();
                    or1.Parameters.Add("MKFNUMKZ4", OracleType.NVarChar).Value = dwData["MKFNUMKZ4"].ToString();
                    or1.Parameters.Add("MKFWERT4", OracleType.NVarChar).Value = dwData["MKFWERT4"].ToString();
                    or1.Parameters.Add("MKFCODE4", OracleType.NVarChar).Value = dwData["MKFCODE4"].ToString();
                    or1.Parameters.Add("MKFTIME4", OracleType.NVarChar).Value = dwData["MKFTIME4"].ToString();
                    or1.Parameters.Add("MKFSETQF5", OracleType.NVarChar).Value = dwData["MKFSETQF5"].ToString();
                    or1.Parameters.Add("MKFNUMKZ5", OracleType.NVarChar).Value = dwData["MKFNUMKZ5"].ToString();
                    or1.Parameters.Add("MKFWERT5", OracleType.NVarChar).Value = dwData["MKFWERT5"].ToString();
                    or1.Parameters.Add("MKFCODE5", OracleType.NVarChar).Value = dwData["MKFCODE5"].ToString();
                    or1.Parameters.Add("MKFTIME5", OracleType.NVarChar).Value = dwData["MKFTIME5"].ToString();
                    or1.Parameters.Add("MKFSETQF6", OracleType.NVarChar).Value = dwData["MKFSETQF6"].ToString();
                    or1.Parameters.Add("MKFNUMKZ6", OracleType.NVarChar).Value = dwData["MKFNUMKZ6"].ToString();
                    or1.Parameters.Add("MKFWERT6", OracleType.NVarChar).Value = dwData["MKFWERT6"].ToString();
                    or1.Parameters.Add("MKFCODE6", OracleType.NVarChar).Value = dwData["MKFCODE6"].ToString();
                    or1.Parameters.Add("MKFTIME6", OracleType.NVarChar).Value = dwData["MKFTIME6"].ToString();
                    or1.Parameters.Add("MKFSETQF7", OracleType.NVarChar).Value = dwData["MKFSETQF7"].ToString();
                    or1.Parameters.Add("MKFNUMKZ7", OracleType.NVarChar).Value = dwData["MKFNUMKZ7"].ToString();
                    or1.Parameters.Add("MKFWERT7", OracleType.NVarChar).Value = dwData["MKFWERT7"].ToString();
                    or1.Parameters.Add("MKFCODE7", OracleType.NVarChar).Value = dwData["MKFCODE7"].ToString();
                    or1.Parameters.Add("MKFTIME7", OracleType.NVarChar).Value = dwData["MKFTIME7"].ToString();
                    or1.Parameters.Add("MKFSETQF8", OracleType.NVarChar).Value = dwData["MKFSETQF8"].ToString();
                    or1.Parameters.Add("MKFNUMKZ8", OracleType.NVarChar).Value = dwData["MKFNUMKZ8"].ToString();
                    or1.Parameters.Add("MKFWERT8", OracleType.NVarChar).Value = dwData["MKFWERT8"].ToString();
                    or1.Parameters.Add("MKFCODE8", OracleType.NVarChar).Value = dwData["MKFCODE8"].ToString();
                    or1.Parameters.Add("MKFTIME8", OracleType.NVarChar).Value = dwData["MKFTIME8"].ToString();
                    or1.Parameters.Add("MKFSETQF9", OracleType.NVarChar).Value = dwData["MKFSETQF9"].ToString();
                    or1.Parameters.Add("MKFNUMKZ9", OracleType.NVarChar).Value = dwData["MKFNUMKZ9"].ToString();
                    or1.Parameters.Add("MKFWERT9", OracleType.NVarChar).Value = dwData["MKFWERT9"].ToString();
                    or1.Parameters.Add("MKFCODE9", OracleType.NVarChar).Value = dwData["MKFCODE9"].ToString();
                    or1.Parameters.Add("MKFTIME9", OracleType.NVarChar).Value = dwData["MKFTIME9"].ToString();
                    or1.Parameters.Add("MKFSETQF10", OracleType.NVarChar).Value = dwData["MKFSETQF10"].ToString();
                    or1.Parameters.Add("MKFNUMKZ10", OracleType.NVarChar).Value = dwData["MKFNUMKZ10"].ToString();
                    or1.Parameters.Add("MKFWERT10", OracleType.NVarChar).Value = dwData["MKFWERT10"].ToString();
                    or1.Parameters.Add("MKFCODE10", OracleType.NVarChar).Value = dwData["MKFCODE10"].ToString();
                    or1.Parameters.Add("MKFTIME10", OracleType.NVarChar).Value = dwData["MKFTIME10"].ToString();
                    or1.Parameters.Add("MKFMODNR", OracleType.NVarChar).Value = dwData["MKFMODNR"].ToString();
                    or1.Parameters.Add("MKFEINSTNR", OracleType.NVarChar).Value = dwData["MKFEINSTNR"].ToString();
                    or1.Parameters.Add("MKFPROG", OracleType.NVarChar).Value = dwData["MKFPROG"].ToString();
                    or1.Parameters.Add("MKFREZST", OracleType.NVarChar).Value = dwData["MKFREZST"].ToString();
                    or1.Parameters.Add("MKFBEZ", OracleType.NVarChar).Value = dwData["MKFBEZ"].ToString();
                    or1.Parameters.Add("MKFCLTIME", OracleType.NVarChar).Value = dwData["MKFCLTIME"].ToString();
                    or1.Parameters.Add("MKFHARCHA", OracleType.NVarChar).Value = dwData["MKFHARCHA"].ToString();
                    or1.Parameters.Add("MKFKZHCMAN", OracleType.NVarChar).Value = dwData["MKFKZHCMAN"].ToString();
                    or1.Parameters.Add("MKFNBWCHA", OracleType.NVarChar).Value = dwData["MKFNBWCHA"].ToString();
                    or1.Parameters.Add("MKFMAUFKRS", OracleType.NVarChar).Value = dwData["MKFMAUFKRS"].ToString();
                    or1.Parameters.Add("MKFMAUFLFD", OracleType.NVarChar).Value = dwData["MKFMAUFLFD"].ToString();
                    or1.Parameters.Add("MKFMAUFPOS", OracleType.NVarChar).Value = dwData["MKFMAUFPOS"].ToString();
                    or1.Parameters.Add("MKFMAFOLGE", OracleType.NVarChar).Value = dwData["MKFMAFOLGE"].ToString();
                    or1.Parameters.Add("MKFMTP", OracleType.NVarChar).Value = dwData["MKFMTP"].ToString();
                    or1.Parameters.Add("MKFVMNRKRS", OracleType.NVarChar).Value = dwData["MKFVMNRKRS"].ToString();
                    or1.Parameters.Add("MKFVMLFDNR", OracleType.NVarChar).Value = dwData["MKFVMLFDNR"].ToString();
                    or1.Parameters.Add("MKFVMPOS", OracleType.NVarChar).Value = dwData["MKFVMPOS"].ToString();
                    or1.Parameters.Add("MKFSDATF", OracleType.NVarChar).Value = dwData["MKFSDATF"].ToString();
                    or1.Parameters.Add("MKFSZEITF", OracleType.NVarChar).Value = dwData["MKFSZEITF"].ToString();
                    or1.Parameters.Add("MKFSDATE", OracleType.NVarChar).Value = dwData["MKFSDATE"].ToString();
                    or1.Parameters.Add("MKFSZEITE", OracleType.NVarChar).Value = dwData["MKFSZEITE"].ToString();
                    or1.Parameters.Add("MKFSDATB", OracleType.NVarChar).Value = dwData["MKFSDATB"].ToString();
                    or1.Parameters.Add("MKFSZEITB", OracleType.NVarChar).Value = dwData["MKFSZEITB"].ToString();
                    or1.Parameters.Add("MKFEDAT", OracleType.NVarChar).Value = dwData["MKFEDAT"].ToString();
                    or1.Parameters.Add("MKFEZEIT", OracleType.NVarChar).Value = dwData["MKFEZEIT"].ToString();
                    or1.Parameters.Add("MKFGRQM", OracleType.NVarChar).Value = dwData["MKFGRQM"].ToString();
                    or1.Parameters.Add("MKFMENGE", OracleType.NVarChar).Value = dwData["MKFMENGE"].ToString();
                    or1.Parameters.Add("MKFKZPOSVERT", OracleType.NVarChar).Value = dwData["MKFKZPOSVERT"].ToString();
                    or1.Parameters.Add("MKFKETTANZ", OracleType.NVarChar).Value = dwData["MKFKETTANZ"].ToString();
                    or1.Parameters.Add("MKFKETTMTR", OracleType.NVarChar).Value = dwData["MKFKETTMTR"].ToString();
                    or1.Parameters.Add("MKFVORPL", OracleType.NVarChar).Value = dwData["MKFVORPL"].ToString();
                    or1.Parameters.Add("MKFDISPO2", OracleType.NVarChar).Value = dwData["MKFDISPO2"].ToString();
                    or1.Parameters.Add("MKFBEM", OracleType.NVarChar).Value = dwData["MKFBEM"].ToString();
                    or1.Parameters.Add("MKFFILLER", OracleType.NVarChar).Value = dwData["MKFFILLER"].ToString();
                    #endregion
                    break;
                case 2:
                    #region========UPDATE============
                    or1.CommandText = "  UPDATE MKRF SET "
                        + "MKFMANDANT=:MKFMANDANT,"
                        + "MKFMNRKRS=:MKFMNRKRS,"
                        + "MKFMLFDNR=:MKFMLFDNR,"
                        + "MKFMPOS=:MKFMPOS,"
                        + "MKFLFDNR=:MKFLFDNR,"
                        + "MKFNEUB=:MKFNEUB,"
                        + "MKFNEUD=:MKFNEUD,"
                        + "MKFAENB=:MKFAENB,"
                        + "MKFAEND=:MKFAEND,"
                        + "MKFAENZL=:MKFAENZL,"
                        + "MKFERLKZ=:MKFERLKZ,"
                        + "MKFERLDAT=:MKFERLDAT,"
                        + "MKFAUFKRS=:MKFAUFKRS,"
                        + "MKFAUFLFD=:MKFAUFLFD,"
                        + "MKFAUFPOS=:MKFAUFPOS,"
                        + "MKFAFOLGE=:MKFAFOLGE,"
                        + "MKFTP=:MKFTP,"
                        + "MKFRWKRS=:MKFRWKRS,"
                        + "MKFRWLFD=:MKFRWLFD,"
                        + "MKFRWPOS=:MKFRWPOS,"
                        + "MKFPLDATV=:MKFPLDATV,"
                        + "MKFSCHICHTV=:MKFSCHICHTV,"
                        + "MKFPLDATB=:MKFPLDATB,"
                        + "MKFSCHICHTB=:MKFSCHICHTB,"
                        + "MKFRFKZ=:MKFRFKZ,"
                        + "MKFRUESTZT=:MKFRUESTZT,"
                        + "MKFBEARBZT=:MKFBEARBZT,"
                        + "MKFSME=:MKFSME,"
                        + "MKFSMG1=:MKFSMG1,"
                        + "MKFSMG2=:MKFSMG2,"
                        + "MKFSMG3=:MKFSMG3,"
                        + "MKFSMG4=:MKFSMG4,"
                        + "MKFSMG5=:MKFSMG5,"
                        + "MKFSMG6=:MKFSMG6,"
                        + "MKFSMG7=:MKFSMG7,"
                        + "MKFSMG8=:MKFSMG8,"
                        + "MKFAUTO=:MKFAUTO,"
                        + "MKFBFARBE1=:MKFBFARBE1,"
                        + "MKFBFARBE2=:MKFBFARBE2,"
                        + "MKFBFARBE3=:MKFBFARBE3,"
                        + "MKFBFARBE4=:MKFBFARBE4,"
                        + "MKFBFARBE5=:MKFBFARBE5,"
                        + "MKFBFARBE6=:MKFBFARBE6,"
                        + "MKFBFARBE7=:MKFBFARBE7,"
                        + "MKFBFARBE8=:MKFBFARBE8,"
                        + "MKFBFARBE9=:MKFBFARBE9,"
                        + "MKFBFARBE10=:MKFBFARBE10,"
                        + "MKFSORTFD1=:MKFSORTFD1,"
                        + "MKFSORTFD2=:MKFSORTFD2,"
                        + "MKFSORTFD3=:MKFSORTFD3,"
                        + "MKFPLSTUFE=:MKFPLSTUFE,"
                        + "MKFBDEDAT=:MKFBDEDAT,"
                        + "MKFBDEZT=:MKFBDEZT,"
                        + "MKFBDEBEN=:MKFBDEBEN,"
                        + "MKFRGBWERT1=:MKFRGBWERT1,"
                        + "MKFRGBWERT2=:MKFRGBWERT2,"
                        + "MKFRGBWERT3=:MKFRGBWERT3,"
                        + "MKFFRBH=:MKFFRBH,"
                        + "MKFFLAG=:MKFFLAG,"
                        + "MKFSETQF1=:MKFSETQF1,"
                        + "MKFNUMKZ1=:MKFNUMKZ1,"
                        + "MKFWERT1=:MKFWERT1,"
                        + "MKFCODE1=:MKFCODE1,"
                        + "MKFTIME1=:MKFTIME1,"
                        + "MKFSETQF2=:MKFSETQF2,"
                        + "MKFNUMKZ2=:MKFNUMKZ2,"
                        + "MKFWERT2=:MKFWERT2,"
                        + "MKFCODE2=:MKFCODE2,"
                        + "MKFTIME2=:MKFTIME2,"
                        + "MKFSETQF3=:MKFSETQF3,"
                        + "MKFNUMKZ3=:MKFNUMKZ3,"
                        + "MKFWERT3=:MKFWERT3,"
                        + "MKFCODE3=:MKFCODE3,"
                        + "MKFTIME3=:MKFTIME3,"
                        + "MKFSETQF4=:MKFSETQF4,"
                        + "MKFNUMKZ4=:MKFNUMKZ4,"
                        + "MKFWERT4=:MKFWERT4,"
                        + "MKFCODE4=:MKFCODE4,"
                        + "MKFTIME4=:MKFTIME4,"
                        + "MKFSETQF5=:MKFSETQF5,"
                        + "MKFNUMKZ5=:MKFNUMKZ5,"
                        + "MKFWERT5=:MKFWERT5,"
                        + "MKFCODE5=:MKFCODE5,"
                        + "MKFTIME5=:MKFTIME5,"
                        + "MKFSETQF6=:MKFSETQF6,"
                        + "MKFNUMKZ6=:MKFNUMKZ6,"
                        + "MKFWERT6=:MKFWERT6,"
                        + "MKFCODE6=:MKFCODE6,"
                        + "MKFTIME6=:MKFTIME6,"
                        + "MKFSETQF7=:MKFSETQF7,"
                        + "MKFNUMKZ7=:MKFNUMKZ7,"
                        + "MKFWERT7=:MKFWERT7,"
                        + "MKFCODE7=:MKFCODE7,"
                        + "MKFTIME7=:MKFTIME7,"
                        + "MKFSETQF8=:MKFSETQF8,"
                        + "MKFNUMKZ8=:MKFNUMKZ8,"
                        + "MKFWERT8=:MKFWERT8,"
                        + "MKFCODE8=:MKFCODE8,"
                        + "MKFTIME8=:MKFTIME8,"
                        + "MKFSETQF9=:MKFSETQF9,"
                        + "MKFNUMKZ9=:MKFNUMKZ9,"
                        + "MKFWERT9=:MKFWERT9,"
                        + "MKFCODE9=:MKFCODE9,"
                        + "MKFTIME9=:MKFTIME9,"
                        + "MKFSETQF10=:MKFSETQF10,"
                        + "MKFNUMKZ10=:MKFNUMKZ10,"
                        + "MKFWERT10=:MKFWERT10,"
                        + "MKFCODE10=:MKFCODE10,"
                        + "MKFTIME10=:MKFTIME10,"
                        + "MKFMODNR=:MKFMODNR,"
                        + "MKFEINSTNR=:MKFEINSTNR,"
                        + "MKFPROG=:MKFPROG,"
                        + "MKFREZST=:MKFREZST,"
                        + "MKFBEZ=:MKFBEZ,"
                        + "MKFCLTIME=:MKFCLTIME,"
                        + "MKFHARCHA=:MKFHARCHA,"
                        + "MKFKZHCMAN=:MKFKZHCMAN,"
                        + "MKFNBWCHA=:MKFNBWCHA,"
                        + "MKFMAUFKRS=:MKFMAUFKRS,"
                        + "MKFMAUFLFD=:MKFMAUFLFD,"
                        + "MKFMAUFPOS=:MKFMAUFPOS,"
                        + "MKFMAFOLGE=:MKFMAFOLGE,"
                        + "MKFMTP=:MKFMTP,"
                        + "MKFVMNRKRS=:MKFVMNRKRS,"
                        + "MKFVMLFDNR=:MKFVMLFDNR,"
                        + "MKFVMPOS=:MKFVMPOS,"
                        + "MKFSDATF=:MKFSDATF,"
                        + "MKFSZEITF=:MKFSZEITF,"
                        + "MKFSDATE=:MKFSDATE,"
                        + "MKFSZEITE=:MKFSZEITE,"
                        + "MKFSDATB=:MKFSDATB,"
                        + "MKFSZEITB=:MKFSZEITB,"
                        + "MKFEDAT=:MKFEDAT,"
                        + "MKFEZEIT=:MKFEZEIT,"
                        + "MKFGRQM=:MKFGRQM,"
                        + "MKFMENGE=:MKFMENGE,"
                        + "MKFKZPOSVERT=:MKFKZPOSVERT,"
                        + "MKFKETTANZ=:MKFKETTANZ,"
                        + "MKFKETTMTR=:MKFKETTMTR,"
                        + "MKFVORPL=:MKFVORPL,"
                        + "MKFDISPO2=:MKFDISPO2,"
                        + "MKFFILLER=:MKFFILLER "

                    #endregion
                    + " WHERE  "
                    + "  WHERE MKFAUFKRS=:MKFAUFKRS AND MKFAUFLFD=:MKFAUFLFD AND MKFAUFPOS=:MKFAUFPOS AND MKFAFOLGE=:MKFAFOLGE AND MKFTP=:MKFTP ";
                    #region=====Parameters=====
                    or1.Parameters.Add("MKFMANDANT", OracleType.NVarChar).Value = dwData["MKFMANDANT"].ToString();
                    or1.Parameters.Add("MKFMNRKRS", OracleType.NVarChar).Value = dwData["MKFMNRKRS"].ToString();
                    or1.Parameters.Add("MKFMLFDNR", OracleType.NVarChar).Value = dwData["MKFMLFDNR"].ToString();
                    or1.Parameters.Add("MKFMPOS", OracleType.NVarChar).Value = dwData["MKFMPOS"].ToString();
                    or1.Parameters.Add("MKFLFDNR", OracleType.NVarChar).Value = dwData["MKFLFDNR"].ToString();
                    or1.Parameters.Add("MKFNEUB", OracleType.NVarChar).Value = dwData["MKFNEUB"].ToString();
                    or1.Parameters.Add("MKFNEUD", OracleType.NVarChar).Value = dwData["MKFNEUD"].ToString();
                    or1.Parameters.Add("MKFAENB", OracleType.NVarChar).Value = dwData["MKFAENB"].ToString();
                    or1.Parameters.Add("MKFAEND", OracleType.NVarChar).Value = dwData["MKFAEND"].ToString();
                    or1.Parameters.Add("MKFAENZL", OracleType.NVarChar).Value = dwData["MKFAENZL"].ToString();
                    or1.Parameters.Add("MKFERLKZ", OracleType.NVarChar).Value = dwData["MKFERLKZ"].ToString();
                    or1.Parameters.Add("MKFERLDAT", OracleType.NVarChar).Value = dwData["MKFERLDAT"].ToString();
                    or1.Parameters.Add("MKFAUFKRS", OracleType.NVarChar).Value = dwData["MKFAUFKRS"].ToString();
                    or1.Parameters.Add("MKFAUFLFD", OracleType.NVarChar).Value = dwData["MKFAUFLFD"].ToString();
                    or1.Parameters.Add("MKFAUFPOS", OracleType.NVarChar).Value = dwData["MKFAUFPOS"].ToString();
                    or1.Parameters.Add("MKFAFOLGE", OracleType.NVarChar).Value = dwData["MKFAFOLGE"].ToString();
                    or1.Parameters.Add("MKFTP", OracleType.NVarChar).Value = dwData["MKFTP"].ToString();
                    or1.Parameters.Add("MKFRWKRS", OracleType.NVarChar).Value = dwData["MKFRWKRS"].ToString();
                    or1.Parameters.Add("MKFRWLFD", OracleType.NVarChar).Value = dwData["MKFRWLFD"].ToString();
                    or1.Parameters.Add("MKFRWPOS", OracleType.NVarChar).Value = dwData["MKFRWPOS"].ToString();
                    or1.Parameters.Add("MKFPLDATV", OracleType.NVarChar).Value = dwData["MKFPLDATV"].ToString();
                    or1.Parameters.Add("MKFSCHICHTV", OracleType.NVarChar).Value = dwData["MKFSCHICHTV"].ToString();
                    or1.Parameters.Add("MKFPLDATB", OracleType.NVarChar).Value = dwData["MKFPLDATB"].ToString();
                    or1.Parameters.Add("MKFSCHICHTB", OracleType.NVarChar).Value = dwData["MKFSCHICHTB"].ToString();
                    or1.Parameters.Add("MKFRFKZ", OracleType.NVarChar).Value = dwData["MKFRFKZ"].ToString();
                    or1.Parameters.Add("MKFRUESTZT", OracleType.NVarChar).Value = dwData["MKFRUESTZT"].ToString();
                    or1.Parameters.Add("MKFBEARBZT", OracleType.NVarChar).Value = dwData["MKFBEARBZT"].ToString();
                    or1.Parameters.Add("MKFSME", OracleType.NVarChar).Value = dwData["MKFSME"].ToString();
                    or1.Parameters.Add("MKFSMG1", OracleType.NVarChar).Value = dwData["MKFSMG1"].ToString();
                    or1.Parameters.Add("MKFSMG2", OracleType.NVarChar).Value = dwData["MKFSMG2"].ToString();
                    or1.Parameters.Add("MKFSMG3", OracleType.NVarChar).Value = dwData["MKFSMG3"].ToString();
                    or1.Parameters.Add("MKFSMG4", OracleType.NVarChar).Value = dwData["MKFSMG4"].ToString();
                    or1.Parameters.Add("MKFSMG5", OracleType.NVarChar).Value = dwData["MKFSMG5"].ToString();
                    or1.Parameters.Add("MKFSMG6", OracleType.NVarChar).Value = dwData["MKFSMG6"].ToString();
                    or1.Parameters.Add("MKFSMG7", OracleType.NVarChar).Value = dwData["MKFSMG7"].ToString();
                    or1.Parameters.Add("MKFSMG8", OracleType.NVarChar).Value = dwData["MKFSMG8"].ToString();
                    or1.Parameters.Add("MKFAUTO", OracleType.NVarChar).Value = dwData["MKFAUTO"].ToString();
                    or1.Parameters.Add("MKFBFARBE1", OracleType.NVarChar).Value = dwData["MKFBFARBE1"].ToString();
                    or1.Parameters.Add("MKFBFARBE2", OracleType.NVarChar).Value = dwData["MKFBFARBE2"].ToString();
                    or1.Parameters.Add("MKFBFARBE3", OracleType.NVarChar).Value = dwData["MKFBFARBE3"].ToString();
                    or1.Parameters.Add("MKFBFARBE4", OracleType.NVarChar).Value = dwData["MKFBFARBE4"].ToString();
                    or1.Parameters.Add("MKFBFARBE5", OracleType.NVarChar).Value = dwData["MKFBFARBE5"].ToString();
                    or1.Parameters.Add("MKFBFARBE6", OracleType.NVarChar).Value = dwData["MKFBFARBE6"].ToString();
                    or1.Parameters.Add("MKFBFARBE7", OracleType.NVarChar).Value = dwData["MKFBFARBE7"].ToString();
                    or1.Parameters.Add("MKFBFARBE8", OracleType.NVarChar).Value = dwData["MKFBFARBE8"].ToString();
                    or1.Parameters.Add("MKFBFARBE9", OracleType.NVarChar).Value = dwData["MKFBFARBE9"].ToString();
                    or1.Parameters.Add("MKFBFARBE10", OracleType.NVarChar).Value = dwData["MKFBFARBE10"].ToString();
                    or1.Parameters.Add("MKFSORTFD1", OracleType.NVarChar).Value = dwData["MKFSORTFD1"].ToString();
                    or1.Parameters.Add("MKFSORTFD2", OracleType.NVarChar).Value = dwData["MKFSORTFD2"].ToString();
                    or1.Parameters.Add("MKFSORTFD3", OracleType.NVarChar).Value = dwData["MKFSORTFD3"].ToString();
                    or1.Parameters.Add("MKFPLSTUFE", OracleType.NVarChar).Value = dwData["MKFPLSTUFE"].ToString();
                    or1.Parameters.Add("MKFBDEDAT", OracleType.NVarChar).Value = dwData["MKFBDEDAT"].ToString();
                    or1.Parameters.Add("MKFBDEZT", OracleType.NVarChar).Value = dwData["MKFBDEZT"].ToString();
                    or1.Parameters.Add("MKFBDEBEN", OracleType.NVarChar).Value = dwData["MKFBDEBEN"].ToString();
                    or1.Parameters.Add("MKFRGBWERT1", OracleType.NVarChar).Value = dwData["MKFRGBWERT1"].ToString();
                    or1.Parameters.Add("MKFRGBWERT2", OracleType.NVarChar).Value = dwData["MKFRGBWERT2"].ToString();
                    or1.Parameters.Add("MKFRGBWERT3", OracleType.NVarChar).Value = dwData["MKFRGBWERT3"].ToString();
                    or1.Parameters.Add("MKFFRBH", OracleType.NVarChar).Value = dwData["MKFFRBH"].ToString();
                    or1.Parameters.Add("MKFFLAG", OracleType.NVarChar).Value = dwData["MKFFLAG"].ToString();
                    or1.Parameters.Add("MKFSETQF1", OracleType.NVarChar).Value = dwData["MKFSETQF1"].ToString();
                    or1.Parameters.Add("MKFNUMKZ1", OracleType.NVarChar).Value = dwData["MKFNUMKZ1"].ToString();
                    or1.Parameters.Add("MKFWERT1", OracleType.NVarChar).Value = dwData["MKFWERT1"].ToString();
                    or1.Parameters.Add("MKFCODE1", OracleType.NVarChar).Value = dwData["MKFCODE1"].ToString();
                    or1.Parameters.Add("MKFTIME1", OracleType.NVarChar).Value = dwData["MKFTIME1"].ToString();
                    or1.Parameters.Add("MKFSETQF2", OracleType.NVarChar).Value = dwData["MKFSETQF2"].ToString();
                    or1.Parameters.Add("MKFNUMKZ2", OracleType.NVarChar).Value = dwData["MKFNUMKZ2"].ToString();
                    or1.Parameters.Add("MKFWERT2", OracleType.NVarChar).Value = dwData["MKFWERT2"].ToString();
                    or1.Parameters.Add("MKFCODE2", OracleType.NVarChar).Value = dwData["MKFCODE2"].ToString();
                    or1.Parameters.Add("MKFTIME2", OracleType.NVarChar).Value = dwData["MKFTIME2"].ToString();
                    or1.Parameters.Add("MKFSETQF3", OracleType.NVarChar).Value = dwData["MKFSETQF3"].ToString();
                    or1.Parameters.Add("MKFNUMKZ3", OracleType.NVarChar).Value = dwData["MKFNUMKZ3"].ToString();
                    or1.Parameters.Add("MKFWERT3", OracleType.NVarChar).Value = dwData["MKFWERT3"].ToString();
                    or1.Parameters.Add("MKFCODE3", OracleType.NVarChar).Value = dwData["MKFCODE3"].ToString();
                    or1.Parameters.Add("MKFTIME3", OracleType.NVarChar).Value = dwData["MKFTIME3"].ToString();
                    or1.Parameters.Add("MKFSETQF4", OracleType.NVarChar).Value = dwData["MKFSETQF4"].ToString();
                    or1.Parameters.Add("MKFNUMKZ4", OracleType.NVarChar).Value = dwData["MKFNUMKZ4"].ToString();
                    or1.Parameters.Add("MKFWERT4", OracleType.NVarChar).Value = dwData["MKFWERT4"].ToString();
                    or1.Parameters.Add("MKFCODE4", OracleType.NVarChar).Value = dwData["MKFCODE4"].ToString();
                    or1.Parameters.Add("MKFTIME4", OracleType.NVarChar).Value = dwData["MKFTIME4"].ToString();
                    or1.Parameters.Add("MKFSETQF5", OracleType.NVarChar).Value = dwData["MKFSETQF5"].ToString();
                    or1.Parameters.Add("MKFNUMKZ5", OracleType.NVarChar).Value = dwData["MKFNUMKZ5"].ToString();
                    or1.Parameters.Add("MKFWERT5", OracleType.NVarChar).Value = dwData["MKFWERT5"].ToString();
                    or1.Parameters.Add("MKFCODE5", OracleType.NVarChar).Value = dwData["MKFCODE5"].ToString();
                    or1.Parameters.Add("MKFTIME5", OracleType.NVarChar).Value = dwData["MKFTIME5"].ToString();
                    or1.Parameters.Add("MKFSETQF6", OracleType.NVarChar).Value = dwData["MKFSETQF6"].ToString();
                    or1.Parameters.Add("MKFNUMKZ6", OracleType.NVarChar).Value = dwData["MKFNUMKZ6"].ToString();
                    or1.Parameters.Add("MKFWERT6", OracleType.NVarChar).Value = dwData["MKFWERT6"].ToString();
                    or1.Parameters.Add("MKFCODE6", OracleType.NVarChar).Value = dwData["MKFCODE6"].ToString();
                    or1.Parameters.Add("MKFTIME6", OracleType.NVarChar).Value = dwData["MKFTIME6"].ToString();
                    or1.Parameters.Add("MKFSETQF7", OracleType.NVarChar).Value = dwData["MKFSETQF7"].ToString();
                    or1.Parameters.Add("MKFNUMKZ7", OracleType.NVarChar).Value = dwData["MKFNUMKZ7"].ToString();
                    or1.Parameters.Add("MKFWERT7", OracleType.NVarChar).Value = dwData["MKFWERT7"].ToString();
                    or1.Parameters.Add("MKFCODE7", OracleType.NVarChar).Value = dwData["MKFCODE7"].ToString();
                    or1.Parameters.Add("MKFTIME7", OracleType.NVarChar).Value = dwData["MKFTIME7"].ToString();
                    or1.Parameters.Add("MKFSETQF8", OracleType.NVarChar).Value = dwData["MKFSETQF8"].ToString();
                    or1.Parameters.Add("MKFNUMKZ8", OracleType.NVarChar).Value = dwData["MKFNUMKZ8"].ToString();
                    or1.Parameters.Add("MKFWERT8", OracleType.NVarChar).Value = dwData["MKFWERT8"].ToString();
                    or1.Parameters.Add("MKFCODE8", OracleType.NVarChar).Value = dwData["MKFCODE8"].ToString();
                    or1.Parameters.Add("MKFTIME8", OracleType.NVarChar).Value = dwData["MKFTIME8"].ToString();
                    or1.Parameters.Add("MKFSETQF9", OracleType.NVarChar).Value = dwData["MKFSETQF9"].ToString();
                    or1.Parameters.Add("MKFNUMKZ9", OracleType.NVarChar).Value = dwData["MKFNUMKZ9"].ToString();
                    or1.Parameters.Add("MKFWERT9", OracleType.NVarChar).Value = dwData["MKFWERT9"].ToString();
                    or1.Parameters.Add("MKFCODE9", OracleType.NVarChar).Value = dwData["MKFCODE9"].ToString();
                    or1.Parameters.Add("MKFTIME9", OracleType.NVarChar).Value = dwData["MKFTIME9"].ToString();
                    or1.Parameters.Add("MKFSETQF10", OracleType.NVarChar).Value = dwData["MKFSETQF10"].ToString();
                    or1.Parameters.Add("MKFNUMKZ10", OracleType.NVarChar).Value = dwData["MKFNUMKZ10"].ToString();
                    or1.Parameters.Add("MKFWERT10", OracleType.NVarChar).Value = dwData["MKFWERT10"].ToString();
                    or1.Parameters.Add("MKFCODE10", OracleType.NVarChar).Value = dwData["MKFCODE10"].ToString();
                    or1.Parameters.Add("MKFTIME10", OracleType.NVarChar).Value = dwData["MKFTIME10"].ToString();
                    or1.Parameters.Add("MKFMODNR", OracleType.NVarChar).Value = dwData["MKFMODNR"].ToString();
                    or1.Parameters.Add("MKFEINSTNR", OracleType.NVarChar).Value = dwData["MKFEINSTNR"].ToString();
                    or1.Parameters.Add("MKFPROG", OracleType.NVarChar).Value = dwData["MKFPROG"].ToString();
                    or1.Parameters.Add("MKFREZST", OracleType.NVarChar).Value = dwData["MKFREZST"].ToString();
                    or1.Parameters.Add("MKFBEZ", OracleType.NVarChar).Value = dwData["MKFBEZ"].ToString();
                    or1.Parameters.Add("MKFCLTIME", OracleType.NVarChar).Value = dwData["MKFCLTIME"].ToString();
                    or1.Parameters.Add("MKFHARCHA", OracleType.NVarChar).Value = dwData["MKFHARCHA"].ToString();
                    or1.Parameters.Add("MKFKZHCMAN", OracleType.NVarChar).Value = dwData["MKFKZHCMAN"].ToString();
                    or1.Parameters.Add("MKFNBWCHA", OracleType.NVarChar).Value = dwData["MKFNBWCHA"].ToString();
                    or1.Parameters.Add("MKFMAUFKRS", OracleType.NVarChar).Value = dwData["MKFMAUFKRS"].ToString();
                    or1.Parameters.Add("MKFMAUFLFD", OracleType.NVarChar).Value = dwData["MKFMAUFLFD"].ToString();
                    or1.Parameters.Add("MKFMAUFPOS", OracleType.NVarChar).Value = dwData["MKFMAUFPOS"].ToString();
                    or1.Parameters.Add("MKFMAFOLGE", OracleType.NVarChar).Value = dwData["MKFMAFOLGE"].ToString();
                    or1.Parameters.Add("MKFMTP", OracleType.NVarChar).Value = dwData["MKFMTP"].ToString();
                    or1.Parameters.Add("MKFVMNRKRS", OracleType.NVarChar).Value = dwData["MKFVMNRKRS"].ToString();
                    or1.Parameters.Add("MKFVMLFDNR", OracleType.NVarChar).Value = dwData["MKFVMLFDNR"].ToString();
                    or1.Parameters.Add("MKFVMPOS", OracleType.NVarChar).Value = dwData["MKFVMPOS"].ToString();
                    or1.Parameters.Add("MKFSDATF", OracleType.NVarChar).Value = dwData["MKFSDATF"].ToString();
                    or1.Parameters.Add("MKFSZEITF", OracleType.NVarChar).Value = dwData["MKFSZEITF"].ToString();
                    or1.Parameters.Add("MKFSDATE", OracleType.NVarChar).Value = dwData["MKFSDATE"].ToString();
                    or1.Parameters.Add("MKFSZEITE", OracleType.NVarChar).Value = dwData["MKFSZEITE"].ToString();
                    or1.Parameters.Add("MKFSDATB", OracleType.NVarChar).Value = dwData["MKFSDATB"].ToString();
                    or1.Parameters.Add("MKFSZEITB", OracleType.NVarChar).Value = dwData["MKFSZEITB"].ToString();
                    or1.Parameters.Add("MKFEDAT", OracleType.NVarChar).Value = dwData["MKFEDAT"].ToString();
                    or1.Parameters.Add("MKFEZEIT", OracleType.NVarChar).Value = dwData["MKFEZEIT"].ToString();
                    or1.Parameters.Add("MKFGRQM", OracleType.NVarChar).Value = dwData["MKFGRQM"].ToString();
                    or1.Parameters.Add("MKFMENGE", OracleType.NVarChar).Value = dwData["MKFMENGE"].ToString();
                    or1.Parameters.Add("MKFKZPOSVERT", OracleType.NVarChar).Value = dwData["MKFKZPOSVERT"].ToString();
                    or1.Parameters.Add("MKFKETTANZ", OracleType.NVarChar).Value = dwData["MKFKETTANZ"].ToString();
                    or1.Parameters.Add("MKFKETTMTR", OracleType.NVarChar).Value = dwData["MKFKETTMTR"].ToString();
                    or1.Parameters.Add("MKFVORPL", OracleType.NVarChar).Value = dwData["MKFVORPL"].ToString();
                    or1.Parameters.Add("MKFDISPO2", OracleType.NVarChar).Value = dwData["MKFDISPO2"].ToString();
                    or1.Parameters.Add("MKFBEM", OracleType.NVarChar).Value = dwData["MKFBEM"].ToString();
                    or1.Parameters.Add("MKFFILLER", OracleType.NVarChar).Value = dwData["MKFFILLER"].ToString();
                    #endregion
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        }
        public void InsertMKRF(DataRow dwData, int option = 1)
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "INSERT INTO MKRF(MKFMANDANT, MKFMNRKRS, MKFMLFDNR, MKFMPOS, MKFLFDNR, MKFNEUB, MKFNEUD, MKFAENB, MKFAEND, MKFAENZL, MKFERLKZ, MKFERLDAT, MKFAUFKRS, MKFAUFLFD, MKFAUFPOS, MKFAFOLGE, MKFTP, MKFRWKRS, MKFRWLFD, MKFRWPOS, MKFPLDATV, MKFSCHICHTV, MKFPLDATB, MKFSCHICHTB, MKFRFKZ, MKFRUESTZT, MKFBEARBZT, MKFSME, MKFSMG1, MKFSMG2, MKFSMG3, MKFSMG4, MKFSMG5, MKFSMG6, MKFSMG7, MKFSMG8, MKFAUTO, MKFBFARBE1, MKFBFARBE2, MKFBFARBE3, MKFBFARBE4, MKFBFARBE5, MKFBFARBE6, MKFBFARBE7, MKFBFARBE8, MKFBFARBE9, MKFBFARBE10, MKFSORTFD1, MKFSORTFD2, MKFSORTFD3, MKFPLSTUFE, MKFBDEDAT, MKFBDEZT, MKFBDEBEN, MKFRGBWERT1, MKFRGBWERT2, MKFRGBWERT3, MKFFRBH, MKFFLAG, MKFSETQF1, MKFNUMKZ1, MKFWERT1, MKFCODE1, MKFTIME1, MKFSETQF2, MKFNUMKZ2, MKFWERT2, MKFCODE2, MKFTIME2, MKFSETQF3, MKFNUMKZ3, MKFWERT3, MKFCODE3, MKFTIME3, MKFSETQF4, MKFNUMKZ4, MKFWERT4, MKFCODE4, MKFTIME4, MKFSETQF5, MKFNUMKZ5, MKFWERT5, MKFCODE5, MKFTIME5, MKFSETQF6, MKFNUMKZ6, MKFWERT6, MKFCODE6, MKFTIME6, MKFSETQF7, MKFNUMKZ7, MKFWERT7, MKFCODE7, MKFTIME7, MKFSETQF8, MKFNUMKZ8, MKFWERT8, MKFCODE8, MKFTIME8, MKFSETQF9, MKFNUMKZ9, MKFWERT9, MKFCODE9, MKFTIME9, MKFSETQF10, MKFNUMKZ10, MKFWERT10, MKFCODE10, MKFTIME10, MKFMODNR, MKFEINSTNR, MKFPROG, MKFREZST, MKFBEZ, MKFCLTIME, MKFHARCHA, MKFKZHCMAN, MKFNBWCHA, MKFMAUFKRS, MKFMAUFLFD, MKFMAUFPOS, MKFMAFOLGE, MKFMTP, MKFVMNRKRS, MKFVMLFDNR, MKFVMPOS, MKFSDATF, MKFSZEITF, MKFSDATE, MKFSZEITE, MKFSDATB, MKFSZEITB, MKFEDAT, MKFEZEIT, MKFGRQM, MKFMENGE, MKFKZPOSVERT, MKFKETTANZ, MKFKETTMTR, MKFVORPL, MKFDISPO2, MKFBEM, MKFFILLER)"
                        + " VALUES (:MKFMANDANT, :MKFMNRKRS,:MKFMLFDNR, :MKFMPOS, :MKFLFDNR, 'INTEXE  ', 20140913, '        ', 0, 0, ' ', '00000000', :MKFAUFKRS, :MKFAUFLFD, :MKFAUFPOS, :MKFAFOLGE, :MKFTP, '  ', '000000', '0000', :MKFPLDATV, :MKFSCHICHTV, 0, '0', ' ', 0, :MKFBEARBZT, :MKFSME, 0, 0, 0, 0, :MKFSMG5, 0, 0, 0, ' ', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '11.09.14                                                                   ', '                                                                           ', '                                                                           ', ' ', 0, 0, '        ', '000', '000', '000', '000', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '000', '000', '                ', '0', '                              ', 0, ' ', ' ', '00', '  ', '000000', '000', '000', '0000', '  ', '0000', '00', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' ', 0, 0, ' ', ' ', '                                        ', '                                                                            ')";
                    #region=====Parameters=====
                    or1.Parameters.Add("MKFMANDANT", OracleType.NVarChar).Value = dwData["MKFMANDANT"].ToString();
                    or1.Parameters.Add("MKFMNRKRS", OracleType.NVarChar).Value = dwData["MKFMNRKRS"].ToString();
                    or1.Parameters.Add("MKFMLFDNR", OracleType.NVarChar).Value = dwData["MKFMLFDNR"].ToString();
                    or1.Parameters.Add("MKFMPOS", OracleType.NVarChar).Value = dwData["MKFMPOS"].ToString();
                    or1.Parameters.Add("MKFLFDNR", OracleType.NVarChar).Value = dwData["MKFLFDNR"].ToString();
                    or1.Parameters.Add("MKFAUFKRS", OracleType.NVarChar).Value = dwData["MKFAUFKRS"].ToString();
                    or1.Parameters.Add("MKFAUFLFD", OracleType.NVarChar).Value = dwData["MKFAUFLFD"].ToString();
                    or1.Parameters.Add("MKFAUFPOS", OracleType.NVarChar).Value = dwData["MKFAUFPOS"].ToString();
                    or1.Parameters.Add("MKFTP", OracleType.NVarChar).Value = dwData["MKFTP"].ToString();
                    or1.Parameters.Add("MKFAFOLGE", OracleType.NVarChar).Value = dwData["MKFAFOLGE"].ToString();
                    or1.Parameters.Add("MKFPLDATV", OracleType.NVarChar).Value = dwData["MKFPLDATV"].ToString();
                    or1.Parameters.Add("MKFSCHICHTV", OracleType.NVarChar).Value = dwData["MKFSCHICHTV"].ToString();
                    or1.Parameters.Add("MKFBEARBZT", OracleType.NVarChar).Value = dwData["MKFBEARBZT"].ToString();
                    or1.Parameters.Add("MKFSME", OracleType.NVarChar).Value = dwData["MKFSME"].ToString();
                    or1.Parameters.Add("MKFSMG5", OracleType.NVarChar).Value = dwData["MKFSMG5"].ToString();
                    #endregion
                    break;
                case 2:
                    or1.CommandText = "INSERT INTO MKRF(MKFMANDANT, MKFMNRKRS, MKFMLFDNR, MKFMPOS, MKFLFDNR, MKFNEUB, MKFNEUD, MKFAENB, MKFAEND, MKFAENZL, MKFERLKZ, MKFERLDAT, MKFAUFKRS, MKFAUFLFD, MKFAUFPOS, MKFAFOLGE, MKFTP, MKFRWKRS, MKFRWLFD, MKFRWPOS, MKFPLDATV, MKFSCHICHTV, MKFPLDATB, MKFSCHICHTB, MKFRFKZ, MKFRUESTZT, MKFBEARBZT, MKFSME, MKFSMG1, MKFSMG2, MKFSMG3, MKFSMG4, MKFSMG5, MKFSMG6, MKFSMG7, MKFSMG8, MKFAUTO, MKFBFARBE1, MKFBFARBE2, MKFBFARBE3, MKFBFARBE4, MKFBFARBE5, MKFBFARBE6, MKFBFARBE7, MKFBFARBE8, MKFBFARBE9, MKFBFARBE10, MKFSORTFD1, MKFSORTFD2, MKFSORTFD3, MKFPLSTUFE, MKFBDEDAT, MKFBDEZT, MKFBDEBEN, MKFRGBWERT1, MKFRGBWERT2, MKFRGBWERT3, MKFFRBH, MKFFLAG, MKFSETQF1, MKFNUMKZ1, MKFWERT1, MKFCODE1, MKFTIME1, MKFSETQF2, MKFNUMKZ2, MKFWERT2, MKFCODE2, MKFTIME2, MKFSETQF3, MKFNUMKZ3, MKFWERT3, MKFCODE3, MKFTIME3, MKFSETQF4, MKFNUMKZ4, MKFWERT4, MKFCODE4, MKFTIME4, MKFSETQF5, MKFNUMKZ5, MKFWERT5, MKFCODE5, MKFTIME5, MKFSETQF6, MKFNUMKZ6, MKFWERT6, MKFCODE6, MKFTIME6, MKFSETQF7, MKFNUMKZ7, MKFWERT7, MKFCODE7, MKFTIME7, MKFSETQF8, MKFNUMKZ8, MKFWERT8, MKFCODE8, MKFTIME8, MKFSETQF9, MKFNUMKZ9, MKFWERT9, MKFCODE9, MKFTIME9, MKFSETQF10, MKFNUMKZ10, MKFWERT10, MKFCODE10, MKFTIME10, MKFMODNR, MKFEINSTNR, MKFPROG, MKFREZST, MKFBEZ, MKFCLTIME, MKFHARCHA, MKFKZHCMAN, MKFNBWCHA, MKFMAUFKRS, MKFMAUFLFD, MKFMAUFPOS, MKFMAFOLGE, MKFMTP, MKFVMNRKRS, MKFVMLFDNR, MKFVMPOS, MKFSDATF, MKFSZEITF, MKFSDATE, MKFSZEITE, MKFSDATB, MKFSZEITB, MKFEDAT, MKFEZEIT, MKFGRQM, MKFMENGE, MKFKZPOSVERT, MKFKETTANZ, MKFKETTMTR, MKFVORPL, MKFDISPO2, MKFBEM, MKFFILLER)"
                        + " VALUES (:MKFMANDANT, :MKFMNRKRS,:MKFMLFDNR, :MKFMPOS, :MKFLFDNR, 'INTEXE  ', 20140913, '        ', 0, 0, ' ', '00000000', :MKFAUFKRS, :MKFAUFLFD, :MKFAUFPOS, :MKFAFOLGE, :MKFTP, '  ', '000000', '0000', :MKFPLDATV, :MKFSCHICHTV, 0, '0', ' ', 0, :MKFBEARBZT, :MKFSME, 0, 0, 0, 0, :MKFSMG5, 0, 0, 0, ' ', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '11.09.14                                                                   ', '                                                                           ', '                                                                           ', ' ', 0, 0, '        ', '000', '000', '000', '000', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '  ', ' ', '                ', '   ', 0, '000', '000', '                ', '0', '                              ', 0, ' ', ' ', '00', '  ', '000000', '000', '000', '0000', '  ', '0000', '00', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' ', 0, 0, ' ', ' ', '                                        ', '                                                                            ')";
                    #region=====Parameters=====
                    or1.Parameters.Add("MKFMANDANT", OracleType.NVarChar).Value = dwData["MKFMANDANT"].ToString();
                    or1.Parameters.Add("MKFMNRKRS", OracleType.NVarChar).Value = dwData["MKFMNRKRS"].ToString();
                    or1.Parameters.Add("MKFMLFDNR", OracleType.NVarChar).Value = dwData["MKFMLFDNR"].ToString();
                    or1.Parameters.Add("MKFMPOS", OracleType.NVarChar).Value = dwData["MKFMPOS"].ToString();
                    or1.Parameters.Add("MKFLFDNR", OracleType.NVarChar).Value = dwData["MKFLFDNR"].ToString();
                    or1.Parameters.Add("MKFAUFKRS", OracleType.NVarChar).Value = dwData["MKFAUFKRS"].ToString();
                    or1.Parameters.Add("MKFAUFLFD", OracleType.NVarChar).Value = dwData["MKFAUFLFD"].ToString();
                    or1.Parameters.Add("MKFAUFPOS", OracleType.NVarChar).Value = dwData["MKFAUFPOS"].ToString();
                    or1.Parameters.Add("MKFAFOLGE", OracleType.NVarChar).Value = dwData["MKFAFOLGE"].ToString();
                    or1.Parameters.Add("MKFTP", OracleType.NVarChar).Value = dwData["MKFTP"].ToString(); 
                    or1.Parameters.Add("MKFPLDATV", OracleType.NVarChar).Value = dwData["MKFPLDATV"].ToString();
                    or1.Parameters.Add("MKFSCHICHTV", OracleType.NVarChar).Value = dwData["MKFSCHICHTV"].ToString();
                    or1.Parameters.Add("MKFBEARBZT", OracleType.NVarChar).Value = dwData["MKFBEARBZT"].ToString();
                    or1.Parameters.Add("MKFSME", OracleType.NVarChar).Value = dwData["MKFSME"].ToString();
                    or1.Parameters.Add("MKFSMG5", OracleType.NVarChar).Value = dwData["MKFSMG5"].ToString();
                    #endregion
                    break;
            }
            Connect2Proxy(or1);
        }
    }
}
